package com.qiqidream.admin.system.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.qiqidream.admin.common.base.BaseEntity;
import com.qiqidream.admin.common.entity.AuthJson;
import lombok.*;


/**
 * 系统管理-用户基础信息表
 * @author QiQiDream
 * @since 2019/11/18 10:53
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(autoResultMap = true,value = "sys_user")
public class User extends BaseEntity {

	/**
	 * 部门ID
	 */
	private Long deptId;

	/**
	 * 账号
	 */
	private String username;

	/**
	 * 登录密码
	 */
	private String password;

	/**
	 * 昵称
	 */
	private String nickName;

	/**
	 * 头像
	 */
	private String avatar;

	/**
	 * 手机号码
	 */
	private String phone;

	/**
	 * 邮箱
	 */
	private String email;

	/**
	 * 授权数据(JSON)
	 */
	@TableField(typeHandler = FastjsonTypeHandler.class)
	private AuthJson authJson;

	/**
	 * 是否启用
	 */
	@TableField("is_enabled")
	private Boolean enabled;

}
